]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: remove additional params from activateResult() call
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 5 Dec 2012 15:05:48 +0000 (10:05 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 6 Dec 2012 17:15:13 +0000 (12:15 -0500)
The only case when we're interested in using those parameters nowadays
is for DnD, which is handled in a separate method already.
Since we're not going to support DnD for non-app search results anyway,
drop the params from all the activateResults() calls; this will be
useful later since we're going to add another parameter to it.

https://bugzilla.gnome.org/show_bug.cgi?id=689735

js/ui/appDisplay.js
js/ui/searchDisplay.js
js/ui/wanda.js

index a80b6846a84d8b185b8aa69e64d67b6043f374fe..be5de906890e0edc73a343d5a835f40c6edf1f2c 100644 (file)
@@ -340,18 +340,15 @@ const AppSearchProvider = new Lang.Class({
         this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
     },
 
-    activateResult: function(app, params) {
-        params = Params.parse(params, { workspace: -1,
-                                        timestamp: 0 });
-
+    activateResult: function(app) {
         let event = Clutter.get_current_event();
         let modifiers = event ? event.get_state() : 0;
         let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
 
         if (openNewWindow)
-            app.open_new_window(params.workspace);
+            app.open_new_window(-1);
         else
-            app.activate_full(params.workspace, params.timestamp);
+            app.activate();
     },
 
     dragActivateResult: function(id, params) {
@@ -402,15 +399,8 @@ const SettingsSearchProvider = new Lang.Class({
         this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
     },
 
-    activateResult: function(pref, params) {
-        params = Params.parse(params, { workspace: -1,
-                                        timestamp: 0 });
-
-        pref.activate_full(params.workspace, params.timestamp);
-    },
-
-    dragActivateResult: function(pref, params) {
-        this.activateResult(pref, params);
+    activateResult: function(pref) {
+        pref.activate();
     },
 
     createResultActor: function (resultMeta, terms) {
index 12599660372f24dadd362a8ef77e2d62fab7bf78..7d81594d1992dc3ec61c3b253d3610effe8aa186 100644 (file)
@@ -96,7 +96,7 @@ const SearchResult = new Lang.Class({
         if (this.provider.dragActivateResult)
             this.provider.dragActivateResult(this.metaInfo.id, params);
         else
-            this.provider.activateResult(this.metaInfo.id, params);
+            this.provider.activateResult(this.metaInfo.id);
     }
 });
 
index 303d577705b1d002fb703e57f7d9eeca96ac734b..305bf9baa57309e440dcacc21a3e0fe4a9f19f6a 100644 (file)
@@ -162,7 +162,7 @@ const WandaSearchProvider = new Lang.Class({
         this.getInitialResultSet(terms);
     },
 
-    activateResult: function(fish, params) {
+    activateResult: function(fish) {
         if (this._dialog)
             this._dialog.destroy();
         this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);